<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="header.jsp"%>
		<div class="flex-container">
			<%@ include file="leftmenu.jsp"%>
			<div class="right-container">
			    <div class="right_content">
			    	<div class="header">
			    		<img src="images_c/location.png" />
			    		<h6>首页<span class="relation_symbol">></span><span class="relation_color">双创成果维护</span></h6>
			    	</div>
			    	<div class="tab_content" id="tab_content_enterprise">
			    		<div class="row search_block">
		    				<label class="search_name">成果名称</label>
		    				<input type="text" class="col-md-1 select_data" />
		    				<a href="javascript:void(0)" class="search_btn">查询</a>
				    	</div>
				    	<div class="row table_container">
				    		<div class="row search_result">
				    			<div class="search_result_left">
				    				<div class="search_result_icon"></div>
				    			    <p class="search_result_label">查询结果</p>
				    			</div>
				    			<div class="search_result_right">
				    				<a href="javascript:void(0)" class="resultMaintainAdd"><img src="images_c/operation1.png" /></a> 
				    				<span>增加</span>
				    				<a href="javascript:void(0)" class="resultMaintainAdd"><img src="images_c/operation6.png" /></a>
				    				<span>编辑</span>
				    				<a href="javascript:void(0)" id="resultsMaintainLook"><img src="images_c/operation5.png" /></a>
				    				<span>查看</span>
				    			</div>
				    		</div>
				    		<div class="table_block">
				    			<div class="table_block_report">
					    			<table id="report_table" class="table table-center table-striped table-bordered table-hover"
									cellspacing="0" width="3000px">
						    			<thead>
						    				<tr>
						    					<th></th>
						    					<th>序号</th>
						    					<th>成果名称</th>
						    					<th>公司名称</th>
						    					<th>状态</th>
						    					<th>简述</th>
						    					<th>成果类型</th>
						    				</tr>
						    			</thead>
						    			<tbody>
						    				<tr>
						    					<td><input type="checkbox" class="table_box"></input></td>
						    					<td></td>
						    					<td></td>
						    					<td></td>
						    					<td></td>
						    					<td></td>
						    					<td></td>
						    				</tr>
						    				<tr>
						    					<td><input type="checkbox" class="table_box"></input></td>
						    					<td></td>
						    					<td></td>
						    					<td></td>
						    					<td></td>
						    					<td></td>
						    					<td></td>
						    				</tr>
						    			</tbody>
						    		</table>
				    			</div>
					    		
					    	</div>
				    	</div>
			    	</div>
			    	
			        <!--弹窗开始-->
			        <div class="background" id="bg" style="display: none;">
						<div class="tanchuang" style="width: 625px;">
							<div class="tanchuang_header">
			    				<div class="tanchuang_title">
									<img src="images_c/tanchuang_bianji.png" />
									<p class="tanchuang_title_name">编辑创业成果</p>
								</div>
								<img src="images_c/tanchuang_close.png" class="close"/>
							</div>
						    <div class="tanchuang_line"></div>
							<div class="tanchuang_content" style="padding-left: 0px;">
								<form>
									<div class="form_group">
										<label class="tanchuang_label">创业成果名</label>
<<<<<<< .working
										<input type="text" value="74829_jfg" class="tanchuang_input" id="name" name="name"/>
||||||| .merge-left.r187
										<input type="text" value="" class="tanchuang_input" id="name" name="name"/>
=======
										<input type="text" value="74829_jfg" class="tanchuang_input"/>
>>>>>>> .merge-right.r88
									</div>
									<div class="form_group">
										<label class="tanchuang_label">公司名称</label>
<<<<<<< .working
										<input type="text" value="浪潮" class="tanchuang_input" id="cname" name="cname"/>
||||||| .merge-left.r187
										<input type="text" value="" class="tanchuang_input" id="cname" name="cname"/>
=======
										<input type="text" value="浪潮" class="tanchuang_input"/>
>>>>>>> .merge-right.r88
									</div>
									<div class="form_group">
										<label class="tanchuang_label">成果类型</label>
										<select class="tanchuang_input">
											<option>链接</option>
										</select>
									</div>
									<div class="form_group">
										<label class="tanchuang_label">简述</label>
<<<<<<< .working
										<textarea class="text_view" placeholder="浪潮集团有限公司，即浪潮集团，是中国本土综合实力强大的大型IT企业之一。" id="sketch" name="sketch"></textarea>
||||||| .merge-left.r187
										<textarea class="text_view" placeholder="" id="sketch" name="sketch"></textarea>
=======
										<textarea class="text_view" placeholder="浪潮集团有限公司，即浪潮集团，是中国本土综合实力强大的大型IT企业之一。"></textarea>
>>>>>>> .merge-right.r88
									</div>
									<div class="form_group">
<<<<<<< .working
											<label class="tanchuang_label">状态</label>
											<input id="up" type="radio" name="check" checked="checked" class="tanchu_radio" value="1"/>
											<span class="tanchu_status">上架</span>
											<input id="down" type="radio" name="check" class="tanchu_radio" value="0"/>
											<span class="tanchu_status">未上架</span>
||||||| .merge-left.r187
											<label class="tanchuang_label">状态</label>
											<input id="up" type="radio" name="check" checked="checked" class="tanchu_radio" value="1" onclick="checkshv(1)"/>
											<span class="tanchu_status">上架</span>
											<input id="down" type="radio" name="check" class="tanchu_radio" value="0" onclick="checkshv(0)"/>
											<span class="tanchu_status">未上架</span>
=======
										<label class="tanchuang_label">状态</label>
										<input type="radio" checked="checked" class="tanchu_radio"/>
										<span class="tanchu_status">上架</span>
										<input type="radio" class="tanchu_radio"/>
										<span class="tanchu_status">未上架</span>
>>>>>>> .merge-right.r88
									</div>
									<div class="form_group">
<<<<<<< .working
										<label class="tanchuang_label">成果内容</label>
										<input type="text" value="" class="tanchuang_input" id="cname" name="cname"/>
||||||| .merge-left.r187
										<label class="tanchuang_label">成果内容</label>
										<input type="text" class="tanchuang_input" id="depict" name="depict"/>
=======
										<label class="tanchuang_label">首页图</label>
										<div class="update_card">
											<p>上传附件</p>
										</div>
>>>>>>> .merge-right.r88
									</div>
									<div class="form_group">
<<<<<<< .working
										<label class="tanchuang_label">首页图</label>
										<div class="update_card">
											<img id="rpicurls" style="width:200px;height:100px;" > 
||||||| .merge-left.r187
										<label class="tanchuang_label">首页图</label>
										<div class="update_card" style="width: 300px;height: 200px;">
											<input type="file"  id="file1" name="file1" style="display:none" onchange=PreviewImage(this,'imgPreview1')>
											<div id="imgPreview1" style="z-index:9999"> 
												
												<a style="line-height: 200px" href="javascript:F_Open_dialog('file1')">点击上传
												<img id="pictureurl" style="width:200px;height:100px;" > 
												</a>
											</div>
								    	</div>
									</div>	
									<div class="form_group">
										<label class="tanchuang_label">次页图</label>
										<div class="update_card" style="width: 300px;height: 200px;">
											<input type="file"  id="file2" name="file2" style="display:none" onchange=PreviewImage(this,'imgPreview2')>
											<div id="imgPreview2" style="z-index:9999"> 
												<a style="line-height: 200px" href="javascript:F_Open_dialog('file2')">点击上传
												<img id="pictureurls" style="width:200px;height:100px;" > 
												</a>
											</div>
											<p></p>
								    	</div>
									</div>	
									<div class="form_group">
										<label class="tanchuang_label">&nbsp;</label>
										<div class="btn_group">
											<a class="tanchu_btn tanchu_btn_color1" href="javascript:submit()">提交</a>
											<a class="tanchu_btn tanchu_btn_color2" href="javascript:closeadd()">取消</a>
=======
										<label class="tanchuang_label">次页图</label>
										<div class="update_card">
											<p>上传附件</p>
>>>>>>> .merge-right.r88
										</div>
									</div>
<<<<<<< .working
									
									<div class="form_group">
										<label class="tanchuang_label">首页图</label>
										<div class="update_card">
											<p>上传附件</p>
										</div>
									</div>
									<div class="form_group">
										<label class="tanchuang_label">次页图</label>
										<div class="update_card">
											<p>上传附件</p>
										</div>
									</div>
									<div class="form_group">
||||||| .merge-left.r187
								</form>
							</div>
				    	</div>
				    </div>
				    <!-- 新增/编辑弹窗结束-->
				    
			        <!--查看弹窗开始-->
			        <div class="background" id="bgquery" style="display: none;">
						<div class="tanchuang" style="width: 625px;">
							<div class="tanchuang_header">
			    				<div class="tanchuang_title">
									<img src="images_c/tanchuang_bianji.png" />
									<p class="tanchuang_title_name">创业成果详情</p>
								</div>
								<img src="images_c/tanchuang_close.png" class="close"/>
							</div>
						    <div class="tanchuang_line"></div>
							<div class="tanchuang_content" style="padding-left: 0px;">
								<form id="btn_file" enctype="multipart/form-data" action="admin/sublistAdd" method="POST">
									<input type="text" hidden="true" class="tanchuang_input" id="idquery" name="idquery"/>
									<div class="form_group">
										<label class="tanchuang_label">创业成果名</label>
										<input type="text" value="" class="tanchuang_input" id="namequery" name="namequery" disabled/>
									</div>
									<div class="form_group">
										<label class="tanchuang_label">公司名称</label>
										<input type="text" value="" class="tanchuang_input" id="cnamequery" name="cnamequery" disabled/>
									</div>
									<div class="form_group">
										<label class="tanchuang_label">成果类型</label>
					    				<select  class="tanchuang_input" style="width:100px;" class="col-md-1 select_box" id="typequery" name="typequery"  disabled/>
											<option value="0" ${authenticationBeanQy.status == 0?'selected':''}>附件</option>
											<option value="1" ${authenticationBeanQy.status == 1?'selected':''}>链接</option>
										</select>
									</div>
									<div class="form_group">
										<label class="tanchuang_label">简述</label>
										<textarea class="text_view" placeholder="" id="sketchquery" name="sketchquery"  disabled></textarea>
									</div>
									<div class="form_group">
											<label class="tanchuang_label">状态</label>
											<input id="up" type="radio" name="check" checked="checked" class="tanchu_radio" value="1" onclick="checkshv(1)"/>
											<span class="tanchu_status">上架</span>
											<input id="down" type="radio" name="check" class="tanchu_radio" value="0" onclick="checkshv(0)"/>
											<span class="tanchu_status">未上架</span>
									</div>
									<input type="text" id="shvquery" name="shvquery" hidden="true"/>
									<div class="form_group">
										<label class="tanchuang_label">成果内容</label>
										<input type="text" class="tanchuang_input" id="depictquery" name="depictquery"  disabled/>
									</div>
									
									<div class="form_group">
										<label class="tanchuang_label">首页图</label>
										<div class="update_card" style="width: 300px;height: 200px;">
											<input type="file"  id="file1" name="file1" style="display:none" onchange=PreviewImage(this,'imgPreview1')>
											<div id="imgPreview1" style="z-index:9999"> 
												<img id="pictureurlquery" style="width:300px;height:200px;" > 
											</div>
								    	</div>
									</div>	
									<div class="form_group">
										<label class="tanchuang_label">次页图</label>
										<div class="update_card" style="width: 300px;height: 200px;">
											<input type="file"  id="file2" name="file2" style="display:none" onchange=PreviewImage(this,'imgPreview2')>
											<div id="imgPreview2" style="z-index:9999"> 
												<img id="pictureurlsquery" style="width:300px;height:200px;" > 
											</div>
											<p></p>
								    	</div>
									</div>	
									<div class="form_group">
=======
									<div class="form_group">
>>>>>>> .merge-right.r88
										<label class="tanchuang_label">&nbsp;</label>
										<div class="btn_group">
<<<<<<< .working
											<a class="tanchu_btn tanchu_btn_color1" href="javascript:submit()">提交</a>
											<a class="tanchu_btn tanchu_btn_color2">取消</a>
||||||| .merge-left.r187
											<a class="tanchu_btn tanchu_btn_color2" href="javascript:close()">关闭</a>
=======
											<a class="tanchu_btn tanchu_btn_color1">提交</a>
											<a class="tanchu_btn tanchu_btn_color2">取消</a>
>>>>>>> .merge-right.r88
										</div>
									</div>
								</form>
							</div>
				    	</div>
				    </div>
				    <!-- 弹窗结束-->
				    
			    </div>
			</div>
		</div>
	</body>
	<script>
		$(document).ready(function(){
			$(".resultMaintainAdd").click(function(){
				$(".background").fadeIn();
			});
			/*$("#close").click(function(){
				$(".background").fadeOut();
//				$("this").parents('.background').fadeOut();
			});*/
			$('.close').click(function() {
				$('.background').fadeOut();
			})
		})
<<<<<<< .working
		
		function submit(){
			var shv = $("input[name='check']:checked").val();
			var type = $("#type").val();
			var name = $("#name").val();
			var cname = $("#cname").val();
			var sketch = $("#sketch").val();
			
			var data = {
					"shv":shv,
					"type":type,
					"name":name,
					"cname":cname,
					"sketch":sketch
					};
			$.ajax({
				cache: true,
                type: "POST",
                url:"admin/sublistAdd",
                data:data,
                async: false,
                success: function(data) {
                	alert("操作成功！");
                	location.href = "admin/result";
                }
			})
		}
		
||||||| .merge-left.r187
		
		function submit() 
		{ 
		    var form = document.getElementById('btn_file');
		    form.submit();
		}
		
		function F_Open_dialog(file) 
		{ 
			document.getElementById(file).click(); 
		}
		
		/* 预览ok */
		  function PreviewImage(imgFile,imgPreview) 
		  { 
			
			alert(imgFile);
			alert(imgPreview);
			  var pattern = /(\.*.jpg$)|(\.*.png$)|(\.*.jpeg$)|(\.*.gif$)|(\.*.bmp$)/;      
			  if(!pattern.test(imgFile.value)) 
				  { 
					  alert("系统仅支持jpg/jpeg/png/gif/bmp格式的照片！");  
					  imgFile.focus(); 
				  } 
			  else 
				  { 
				  var path; 
				  if(document.all)//IE 
					  { 
					      imgFile.select(); 
					      path = document.selection.createRange().text; 
					      document.getElementById(imgPreview).innerHTML=""; 
					      document.getElementById(imgPreview).style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true',sizingMethod='scale',src=\"" + path + "\")";//使用滤镜效果 
					  } 
				  else//FF 
					  { 
						  path = URL.createObjectURL(imgFile.files[0]);
						  document.getElementById(imgPreview).innerHTML = "<img src='"+path+"' width='300px' height='200px'/>"; 
					  } 
				  } 
		  }
		
		  function close(){
			  $(".background").fadeOut();
			}
		  
		  function closeadd(){
			  $(".background").fadeOut();
			  /* 新增关闭清除页面缓存，刷新页面 */
			  location.href = "admin/result"
			}
		  function checkshv(checkshv){
			  $("#shv").val(checkshv);
			}
		  
		  function search() 
			{ 
			    var form = document.getElementById('pageform');
			    form.submit();
			}
		  
		  function edit(id){
			  var data = {"id":id};
		      $.ajax({
					cache: true,
	                type: "POST",
	                url:"admin/resultDetail",
	                data:data,
	                async: false,
	                success: function(data) {
			  			var xxSublist = JSON.parse(data);
	                	
	                	$("#id").val(xxSublist.id);
	                	$("#name").val(xxSublist.name);
	                	$("#cname").val(xxSublist.cname);
	                	$("#type").val(xxSublist.type);
	                	$("#sketch").val(xxSublist.sketch);
	                	
	                	if(xxSublist.shv == "1"){
	               	 		$("input[type='radio'][value='1'").attr("checked",true);
	               	 	}
	               	 	if(xxSublist.shv == "0"){
	            	 		$("input[type='radio'][value='0'").attr("checked",true);
	            	 	}
	                	
	                	$("#depict").val(xxSublist.depict);
	                	
	                	$("#pictureurl").attr('src',xxSublist.pictureurl); 
	                	$("#pictureurls").attr('src',xxSublist.pictureurls); 
	                	
	                	$("#bgadd").fadeIn();
	                	
			  
	            	}
				})
		  }
		  function query(id){
			  //TODO
			  var data = {"id":id};
		      $.ajax({
					cache: true,
	                type: "POST",
	                url:"admin/resultDetail",
	                data:data,
	                async: false,
	                success: function(data) {
			  			var xxSublist = JSON.parse(data);
	                	
	                	$("#idquery").val(xxSublist.id);
	                	$("#namequery").val(xxSublist.name);
	                	$("#cnamequery").val(xxSublist.cname);
	                	$("#typequery").val(xxSublist.type);
	                	$("#sketchquery").val(xxSublist.sketch);
	                	
	                	if(xxSublist.shv == "1"){
	               	 		$("input[type='radio'][value='1'").attr("checked",true);
	               	 	}
	               	 	if(xxSublist.shv == "0"){
	            	 		$("input[type='radio'][value='0'").attr("checked",true);
	            	 	}
	                	
	                	$("#depictquery").val(xxSublist.depict);
	                	
	                	$("#pictureurlquery").attr('src',xxSublist.pictureurl); 
	                	$("#pictureurlsquery").attr('src',xxSublist.pictureurls); 
	                	
	                	$("#bgquery").fadeIn();
	                	
			  
	            	}
				})
		  }
=======
>>>>>>> .merge-right.r88
	</script>
</html>